Clean repository when all languages are rebuilt #966
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When docs are built and pushed to https://github.com/MapServer/mapserver.github.io/ old HTML files are never removed.
There are several published pages which have been removed from https://github.com/MapServer/MapServer-documentation/ that are still online. For example:
This pull request adds a step to delete all the files from the https://github.com/MapServer/mapserver.github.io/ repo if a pull request includes
[build_translations]
in the commit message. This tag is already used to trigger rebuilds of all languages.We can only remove all files when rebuilding all languages, otherwise when building just
en
all the language subfolders (ar
,fr
etc.) would be removed.I've tested this on my own forks - see https://github.com/geographika/MapServer-documentation/actions
Note the
uk
andzh_cn
folders are removed completely (they haven't been build for several years):https://github.com/MapServer/mapserver.github.io/tree/master/uk
https://github.com/MapServer/mapserver.github.io/tree/master/zh_cn
The cleaned repository goes from 1.2 GB and 32,141 files to 810 MB and 28,979 files.
You can compare before and after the clean-up by looking at https://github.com/MapServer/mapserver.github.io/ and https://github.com/geographika/mapserver.github.io
The only files not generated by Sphinx README.md and .nojekyll are restored after the repo is cleaned.